package com.xhh.reapply.controller.v1;

import com.xhh.model.common.dtos.ResponseResult;
import com.xhh.model.reapply.dtos.AddChoiceDto;
import com.xhh.model.reapply.dtos.AddPreapplyDto;
import com.xhh.model.reapply.dtos.PreapplyPageDto;
import com.xhh.model.reapply.dtos.UpdateChoiceDto;
import com.xhh.reapply.service.IPreapplyService;
import com.xhh.reapply.service.ReapplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@Api(tags = "复试备选库管理接口")
@RestController
@RequestMapping("/reapply/preapply")
@RequiredArgsConstructor
public class PreapplyController {

    private final IPreapplyService preapplyService;

    @ApiOperation("添加复试备选库")
    @PostMapping("add")
    public ResponseResult addPreapply(@RequestBody AddPreapplyDto dto){
        return preapplyService.addPreapply(dto);
    }

    @ApiOperation("分页查询复试备选库")
    @GetMapping("getPreapplyByPage")
    public ResponseResult getPreapplyByPage(PreapplyPageDto dto){
        return preapplyService.getPreapplyByPage(dto);
    }

}
